package cn.mys.tissue.common.Interceptor;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

import javax.servlet.Filter;

//配置拦截器
@Configuration
public class Interceptorconfig implements WebMvcConfigurer {

    @Autowired
    RecordInterceptor recordInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
    	 registry.addInterceptor(recordInterceptor).addPathPatterns("/**").excludePathPatterns("/logins").excludePathPatterns("/captcha");
        WebMvcConfigurer.super.addInterceptors(registry);
    }
}